package com.sds.system.helpers;

import java.util.List;
import java.util.Random;

public class RandomUtils {
    private static Random random = new Random();

    public static <T> T randomOneOf(List<T> objects) {
        if (objects.size() > 0) {
            return objects.get(random.nextInt(objects.size()));
        } else {
            return null;
        }

    }
}
